package ch.ethz.fcl.metrobuzz.viewer;

import java.awt.event.HierarchyBoundsListener;
import java.awt.event.HierarchyEvent;

import ch.ethz.fcl.metrobuzz.MBContainer;

public class FrameResizeListener implements HierarchyBoundsListener {
	private MBContainer container;

	public FrameResizeListener(MBContainer container) {
		this.container = container;
	}

	@Override
	public void ancestorMoved(HierarchyEvent event) {

	}

	@Override
	public void ancestorResized(HierarchyEvent event) {
		if (container.getControl() != null)
			container.getControl().reset();

		MBViewer.VIEW_PORT_CHANGED = true;
		MBViewer.newUpdate = true;
	}
}
